<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

    <h1 id="title">标题</h1>

    <div class="box" >盒子</div>
    <div class="box" >盒子2</div>
    
    <script src="../src/tangth.js"></script>

    <script>
        var box = $(".box");

        // document.getElementById("title").appendChild(document.createElement("span"));

        // box.append('厉害啦!');
        // box.append('<span>asdas</span>');
        // box.append('<div><span>asdas</span></div>');

        // box.append($('<span>'));

        var span = $("<span>").html('<br />厉害啦');

        span.on('click', function(){
            console.log('asdas');
        })

        var inp = $("<input>").val('yayayy');
        console.log("inp", inp);

        $("#title").append(span);

            
    </script>
</body>
</html>